﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Create.Master" Inherits="System.Web.Mvc.ViewPage<Langben.DAL.ts_dept>" %>

<%@ Import Namespace="Common" %>
<%@ Import Namespace="Models" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CurentPlace" runat="server">
      创建 领料部门表
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <fieldset>
        <legend>
            <input class="a2 f2" type="submit" value="创建" />
            <input class="a2 f2" type="button" onclick="BackList('ts_dept')" value="返回" />
        </legend>
        <div class="bigdiv">
            <div style="display:none"><%: Html.EditorFor(model => model.i_kit)%></div>
            <table style="width:100%; line-height:35px;"> 
              <tr><td width="15%" align="right"><%: Html.LabelFor(model => model.c_dept) %>：</td>
              <td width="85%"> <%: Html.EditorFor(model => model.c_dept) %>
                <%: Html.ValidationMessageFor(model => model.c_dept) %></td></tr>
              <tr><td align="right"><%: Html.LabelFor(model => model.c_id) %>：</td>
              <td> <%: Html.EditorFor(model => model.c_id) %>
                <%: Html.ValidationMessageFor(model => model.c_id) %></td></tr>
              <tr><td align="right"><%--<%: Html.LabelFor(model => model.i_kit) %>：--%></td>
              <td><input type="checkbox" id="cbi_kit" onclick="Changei_kit();" />&nbsp;是否厨房领料部门</td></tr>
              <tr id="tr1"><td align="right"><%: Html.LabelFor(model => model.c_kit) %>：</td>
              <td> <%: Html.EditorFor(model => model.c_kit) %>
                <%: Html.ValidationMessageFor(model => model.c_kit) %></td></tr>
              <tr id="tr2"><td></td><td style="color:Red">如果设置成厨房领料部门，厨房实际<br />领料即根据该部门的领料计算。厨房<br />号可以设置多个如：1,2,3</td></tr>
            </table>     
             
        </div>
    </fieldset>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
    
    <script type="text/javascript">

        $(function () {
            $('#tr1').hide();
            $('#tr2').hide();

        });

        //是否厨房领料部门
        function Changei_kit() {
            if ($("#cbi_kit").attr("checked")) {
                $('#i_kit').val('1');
                $('#tr1').show();
                $('#tr2').show();
            }
            else {
                $('#i_kit').val('0');
                $('#tr1').hide();
                $('#tr2').hide();
            }
        }
              

    </script>
</asp:Content>

